1. Field of the Invention
The present invention relates to a method of managing a database system configured by a plurality of database devices and to a database system for actualizing this operation method.
2. Related Background Art
As known well, for storing a large quantity of operation data generated through daily operations on terminal computers, a database device is generally utilized. Further, for preventing a loss of the operation data due to a natural disaster, a power failure or a system fault, separately from a database device provided at main center for storing the operation data, a replica of this database device is prepared at a sub-center in a remote place to back up the operation data.
Further, the replica may be operated as a secondary database device for the case the database device at the main center becomes unusable, so that the operations on the terminal computers can be continued by using the database device in the sub-center as current movement database device instead of the database device at main center in that case until the database device at the main center is restored. However, when the current movement database device is changed from the database device at the main center to the database device at the sub-center due to occurrence of disaster, a transaction from which the executing of the operation is to be restarted among the series of the transaction constituting the operation must be matched up to the operation data from which new pieces of operation data is to be overwritten after the operation restarts among the series of the operation data stored in the database device in order of their generation.
Note that if an operation mode for backup is an asynchronous mode, because executing result of the same transaction is reflected asynchronously in database devices of each center, there is a time difference between the update of the same operation data in the database device at the main center and that in the database device at the sub-center. Hence, in switching the current movement database device after occurrence of disaster, as a matter of course, it is required that the matching process described above is carried out (refer to, e.g., Japanese Patent Application Laid-Open Publication No. 2004-348701). On the other hand, even if the operation mode is a synchronous mode, because executing result is reflected synchronously in database devices of each center, consistency between the update of the same operation data in the database device at the main center and that in the database device at the sub-center is assured. However, in case each operation consists of plural pieces of transaction which are continually executed as one unit, if the database device at the main center falls during execution of one operation, the transaction which was committed before down in the main center is also committed in a sub-center, but, it must be confirmed which pieces of transaction have been committed among a series of transaction in the broken operation. Moreover, to continue remaining transactions except committed transaction, a system operator needs to make some manipulation such as the input commands to execute the remaining transaction by handwork or making an exclusive program to start the transaction is necessary, which impose the system operator excessive task. Therefore it is common that pieces of operation data of committed transaction among a series of transactions of the broken operation is delete from the database device at the sub-center and the same operation is re-started. However, in this case, it must be confirmed which transactions have been committed among a series of transaction. Therefore, even if the operation mode is the synchronous mode, it is required that the matching process described above is carried out.
The matching process described above has hitherto been executed by collating journal data left in each terminal computers with the operation data already stored in the database device at the sub-center. However, this matching process is extremely time-consuming. It therefore follows that a long period of time is expended from occurrence of disaster until resuming storing the database device at the sub-center with the operation data.
Note that there is recovery technology to return a state of operation data in a database device to a certain past state. Recovery of a database device is performed with a recovery log file. The recovery log file stores log records in which information to specify a transaction is associated with time and date when its corresponding transaction is executed and committed and with an updated operation, respectively. Moreover, a recovery point for specifying an operation to be re-executed is inserted in one of the intervals between log records stored in order of the time and date. To perform recovery of a database device, a system operator designates one of the recovery points in the recovery log file and starts a well-known recovery function, so that the system operator can return a state of operation data in a database device to a state at the time when the recovery point was set.
As described above, in case the database device at the main center gets unusable, the transactions on the terminal computers must be matched up to the operation data in the database device at the sub-center before the resumption of storing the operation data to the database device at the sub-center as current movement database device. Here, for facilitating returning a state of operation data in the database device at sub-center to a certain past state before occurrence of disaster, recovery of the database device at the sub-center may be enabled by adding a recovery function to the database device at main center and the database device at the sub-center and by transferring a copy of information in a recovery log file of main center into sub-center.
However, whether the operation mode for backup is the asynchronous mode or the synchronous mode, execution and commit of same transaction are performed at main center and sub-center individually, so that time and date of execution and commit of transaction performed at the main center is recorded in the recovery log file of the main center, time and date of execution and commit of transaction performed at the sub-center is recorded in the recovery log file of the sub-center. Therefore, even if a copy of the information in the recovery log file of the main center is transferred into sub-center, the recovery function at sub-center cannot be performed normally in the sub-center (refer to, e.g., Japanese Patent Application Laid-Open Publication No. 2005-157897). As a result, recovery point set in the recovery log file of the main center cannot be performed normally at sub-center.
Therefore, such a problem arises that the matching process cannot be performed by use of the recovery point in case of disaster.
Further, in case the database device at the main center is restored, for the resumption of storing the operation data to the database device at the main center as current movement database device, it is necessary to transfer (mirror) the operation data accumulated in the database device at the sub-center to the database device at the main center, and to perform the matching up the operation data accumulated in the database device at the main center to one in the database device at the sub-center. However, in such matching process, it is required that all the items of operation data in the database device at the sub-center be copied to the database device at the main center. In the case of copying all of a large quantity of data held by the database device, the database device must be stopped. Therefore, there is a problem that the operation on the terminal computers must be interrupted for a long period of time before the resumption of storing the operation data to the restored database device at the main center. To resolve the problem, it is devised such a method that the database device at the main center is temporarily configured as a replica of the database device at the sub-center, and the current movement database device is returned from the database device at the sub-center to the database device at the main center. However, with this method, an interruption period of the operation for switching over the current movement database device can be decreased, but the problem that all the items of operation data in the database device at sub-center must be copied to the database device at the main center cannot be resolved.